GFA-AMIGAB EXAMPLES Readme GFA-Basic 3.02 AMIGA 7.2.1989 The Run-Only-Interpreteter -------------------------- The Run-Only-Interpreter GFABASRO is Public Domain. To start your GFA-Basic program with the Run-Only from Workbench, single click it's icon. Then select "INFO" from the Workbenchmenu and change the TOOL (GFABASIC) to GFABASRO. BOBs-Blitter Objects -------------------- Blitter object's are a special kind of sprites. You can create them with the Amiga-Objecteditor. Further you can use the program "IFF TO BOB" to build an Bob. commands: OBJECT.AX object,value OBJECT.AY object,value defines the acceleration of the Bob (pixels/sec) OBJECT.CLIP x0,y0,x1,y1 defines a frame where the Bobs are visible OBJECT.CLOSE [Obj [,Obj [,Obj ] ] ] erase Object[s] without parameters all objects are erased OBJECT.ON [Obj [,Obj [Obj ] ] ] OBJECT.OFF " " " Obj : 16 Bit object-number switches an object. without parameters all objects are switched on/off OBJECT.PLANES Obj [PlanePick [,PlaneOnOff ] ] PlanePick, PlaneOnOff : 8-Bit-Masks OBJECT.PLANES fixes the Bob's color. PlanePick defines the bitplane in which the BobInfos are painted. PlaneOnOff defines the used bitplanes. OBJECT.PRIORITY Obj,Prio Bobs with a higher priority are set in front of bobs with a lower priority. OBECT.SHAPE Obj,String OBECT.SHAPE Obj1,Obj2 (1) The definition for Bob number is given by a String from the Object-Editor or the "IFF_TO_BOB" program. (2) Obj1 uses the shape of Obj2. OBJECT.START [Obj [,Obj [,Obj ] ] ] OBJECT.STOP " " " Start and stop of Bobs-movements. All objects are stopped or started if there are no parameters. OBJECT.VX Obj,Value OBJECT.VY " " defines the speed of an object in pixels per sec. OBJECT.X Obj,Value OBJECT.X " " set object number Obj at ValueX/ValueY Don't forget using the OBJECT.ON command to make the Bob[s] visible. ON COLLISION GOSUB proc proc: Procedure's name to react on collision Object-Functions: use ...=OBJECT.X(Obj) =OBJECT.Y(Obj) =OBJECT.VX(Obj) =OBJECT.VY(Obj) =OBJECT.AX(Obj) =OBJECT.AY(Obj) to read the position, acceleration or the speed of the specified Object. The GFA Bob-commands work similar to the AmigaBasic Object-commands except for:. - Collision ON/OFF/STOP is not possible - ...=COLLISION(-1) does not give number of the window E D I T O R M E N U : ----------------------- LOAD Amiga-L as F1 SAVE Amiga-S as shift-F1 New Names Amiga-N ask for confirmation when new variables are introduced (switch) RUN Amiga-R as Shift-F10 Taskpri 0 Amiga-0 Changes taskpriority to 0. Taskpri 1 Amiga-1 Changes taskpriority to 1. Use ~SetTaskPri(FindTask(0),n) to set other taskpriorities. Clenup Amiga-C Stop Sound, stop Bobs and clear Sprites Closes Screens and Windows. NewCli starts a new CLI Icon Amiga-I Save program with Icon or without N E W C O M M A N D S: ---------------------- The following command are added: OPEN "_",#_,"COM1:[BAUDRATE [,PARITY [,LENGTH [,STOPBITS]]]]" with: BAUDRATE: 110/150/300/600/1200/1800/2400/4800/9600/19200 PARITY: "N" (no parity), "O" (odd) or "E" (even parity). LENGTH: the number of bits (5 to 8) STOPBITS: the number of stopbits to use (1 or 2) This command is used as in AmigaBasic. It opens a file for Input or Output to the serial port, and allows to configure the serial port. examples: OPEN "I",#1,"COM1:9600,N,7,1" opens for input, sets the serial port to 9600 Baud, No parity, 7 bits with 1 stopbit. OPEN"O",#1,"COM1:300,O,6,1" opens for output, sets the serial port to 300 Baud, Odd parity, 6 bits and 1 stopbit. OPEN"O",#1,"COM1:600" leaves all paramters unchanged except for the baudrate. - GET/PUT now use clipping - SGET $()/SPUT $() : They do the same as the SGET string / SPUT string -commands on the ST, except that they use a string-ARRAY instead of a string (On the Amiga a screen can use more than 32K). They work on screen: they take (or put) the contents of a whole screen. - SCROLL dx,dy,x0,y0,x1,y1 scrolls a rectangle in your window. i.e.: SCROLL 2,3,10,10,100,100 scrolls the rectangle (10,10)-(100,100) two pixels to the right, 3 pixels down, and the second parameter of COLOR determines the color of the borders that are scrolled in (here left and upper border of the rectangle). - Now GFABASIC also saves an Icon with your sources if you want it to. Therefore, the pull-down menu got an extra selection called "Save Icon", shortcut is "Right_Amiga_Key + I". Use this to turn this icon-save-option on or off. F O R ... N E X T ----------------- FOR ... NEXT loops are now not executed if the start value is not already greater than the endvalue. The following loops give similar results: FOR NEXT GFA-Basic V3.00 GFA-Basic V3.02 FOR i=a TO b i=a i=a ... REPEAT WHILE ib WEND